package com.yunxi.service.localService.sys.impl;

import com.yunxi.core.service.ServiceImplPlus;
import com.yunxi.dao.sys.RoleMapper;
import com.yunxi.model.sys.Role;
import com.yunxi.service.localService.sys.RoleService;
import com.yunxi.sys.pojo.RoleVO;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by 枫下 on 2018/1/23.
 */
@Service
public class RoleServiceImpl extends ServiceImplPlus<RoleMapper,Role> implements RoleService {

    @Override
    public List listByOrgId(String companyId) {
        Map map = new HashMap();
        map.put("orgId",companyId);
        return baseMapper.queryByList(map);
    }

    @Override
    public RoleVO getByRoleCode(String roleCode) {
        Map map = new HashMap();
        map.put("roleCode",roleCode);
        return baseMapper.getByRoleCode(map);
    }
}
